package com.igeek.d0613.test2;


/**
 * @Author: zhiyu
 * @Date:17:15
 * @DESC:
 */
public class DepositThread extends Thread{
    private Account account;
    private double amount;

    public DepositThread(Account account, String name, double amount) {
        super(name);
        this.account = account;
        this.amount = amount;
    }

    @Override
    public void run() {
        for (int i = 0; i < 10; i++) {
            account.deposit(amount);
        }
    }
}
